import http from "../request.js"


// adsCountInc(1)广告点击量+1
function adsCountInc(id) {
	return http({
		url: `/lejuClient/home/adsCountInc/${id}`,
		method: "post"
	})
}


// 查询轮播广告
function bannerAds() {
	return http({
		url: "/lejuClient/home/bannerAds"
	})
}



// latestProducts(1,10,{})
// /lejuClient/home/latestProducts/${start}/${limit} ? id=1
// 分类列表
function categorys(parentId, data) {
	return http({
		url: `/lejuClient/home/categorys/${parentId}`,
		data: data
	})
}



// 推荐最热列表
function hotList() {
	return http({
		url: "/lejuClient/home/hotList"
	})
}


// latestProducts(1,10,{})
// /lejuClient/home/latestProducts/${start}/${limit} ? id=1
//推荐新品列表
function latestProducts(start, limit, data) {
	return http({
		url: `/lejuClient/home/latestProducts/${start}/${limit}`,
		data: data
	})
}



// 推荐新品列表  只展示乐居商品
function lejuLatestProducts() {
	return http({
		url: "/lejuClient/home/lejuLatestProducts"
	})
}



// 限时活动列表
function recommendList() {
	return http({
		url: "/lejuClient/home/recommendList"
	})
}




// 最高销量
function saleMostProducts() {
	return http({
		url: "/lejuClient/home/saleMostProducts"
	})
}









export {
	adsCountInc,
	bannerAds,
	categorys,
	hotList,
	latestProducts,
	lejuLatestProducts,
	recommendList,
	saleMostProducts
}
